	<div class="column full fl">
		<div class="box-content box-table">
			
            <?php echo $this->session->flashdata('message'); ?>
            
			<table class="tablebox">
				<thead class="table-header">
					<tr>
						<th><?php echo $this->lang->line('product_name'); ?></th>
                        <th class="width60"><?php echo $this->lang->line('product_time'); ?></th>
						<th><?php echo $this->lang->line('invest'); ?></th>
						<th class="tc" width="10%"></th>
					</tr>
				</thead>
				
				<tbody class="openable-tbody">
                    <?php $i=1; ?>
					<?php foreach($table['targets'] as $rec): ?>
                    <?php if($i % 2 == 0): 
                            $zebra="odd";
                          else: 
                            $zebra="even";
                          endif;
                    ?>
                    <tr class="<?php echo $zebra;?>">
						<td>
							<h5><?php echo $rec['month_name'].','.$rec['year']; ?></h5>
		
						</td>
                        <td >
							<?php echo $rec['user_stamp']; ?>
		
						</td>
						<td class="tc">
							<?php echo $rec['date_stamp']; ?>
						</td>
						<td class="tc width20 ">
                        <?php if(($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))):?>
						<a class="button themed openable"><span class="icon_single extend"></span></a>
                        <a class="button white" href="<?php echo site_url($this->config->item('job_target_del').$rec['id']); ?>"><span class="icon_single cancel"></span></a>
                        <?php endif;?>
						</td>
                        
					</tr>
                    
					<tr class="odd openable-tr">
						<?php //echo form_open($this->config->item('product_upd')); ?>
                        <td colspan="4">
						
                        <table class="tablebox">
		<thead class="table-header">
		<tr>
			<th class="first tc"><?php echo $this->lang->line('user_call'); ?></th>
			<th><?php echo $this->lang->line('name'); ?></th>
			<th><?php echo $this->lang->line('pos'); ?></th>
			<th><?php echo $this->lang->line('tlp'); ?></th>
			<th><?php echo $this->lang->line('target'); ?></th>
			<th class="tc">actions</th>
		</tr>
		</thead>
		<tbody>
            <?php foreach($table['details'] as $row): ?>
		    <?php if($rec['id']==$row['job_id']): ?>
            <tr class="odd">
				<td class=" first tc"><?php echo $row['username']; ?></td>

				<td class="tc"><?php echo $row['name']; ?></td>
				<td><?php echo $row['pos_name']; ?></td>
				<td><?php echo $row['tlp']; ?></td>
				<td><?php echo number_format($row['target'],2); ?></td>
				<td>
				<a class="button white" href="<?php echo site_url($this->config->item('job_target_user_del').$row['id']); ?>"><span class="icon_single cancel"></span></a>
				

				</td>
			</tr>
            <?php endif;?>	
			<?php endforeach;?>
		</tbody>
		</table>
        <hr />
        <?php echo form_open($form['jobs_user']); ?>
        <?php echo form_hidden('id',$rec['id']); ?>
							<div class="fl typo">
							<b><?php $this->config->item('job'); ?></b>
							<p class="p_justify">
                              <label><?php echo $this->lang->line('month') ?></label>
							  <select name="user" class="form-field">
                                <?php foreach($table['users'] as $user): ?>
                                    <option value="<?php echo $user['username']; ?>"><?php echo $user['username'].'-'.$user['name']; ?></option>
                                <?php endforeach;?>
                              </select>
							</p>
							</div>
                            
                            <div class="s_3"></div>
                            
                            <div class="fl typo">
							<b><?php $this->config->item('job'); ?></b>
							<p class="p_justify">
                              
							 <input type="text" name="target" class="form-field" maxlength="200" value="" />
							</p>
							</div>
												
							<div class="fr">
								<input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('add_user');?>" name="save" />
							</div>
						
						<div class="clear"></div>
      <?php echo form_close();?>	
						
						</td>
					</tr>
                    <?php $i++; endforeach;?>
					
                    <tr>
						<td class="width80">
							<h5><?php echo $this->lang->line('add'); ?></h5>
		
						</td>
						<td class="tc">

							
						</td>
                        <td class="tc">

							
						</td>
						<td class="tc">
                        <?php if(($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))):?>
						<a class="button themed openable"><span class="icon_single extend"></span></a>
                        <?php endif;?>
						</td>
					</tr>
                    
					<tr class="odd openable-tr">
						<td colspan="4">
                        <?php echo form_open($form['jobs']); ?>
							<div class="fl typo">
							<b><?php $this->config->item('job'); ?></b>
							<p class="p_justify">
                              <label><?php echo $this->lang->line('month') ?></label>
							  <?php echo  form_dropdown('month',$this->lang->line('month_list')); ?>
							</p>
							</div>
                            
                            <div class="s_3"></div>
                            
                            <div class="fl typo">
							<b><?php $this->config->item('job'); ?></b>
							<p class="p_justify">
                              
							  <?php echo  form_dropdown('year',$this->lang->line('year_list')); ?>
							</p>
							</div>
												
							<div class="fr">
								<input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
							</div>
						
						<div class="clear"></div>
                        <?php echo form_close();?>
						</td>
					</tr>
                    
				</tbody>
			</table>
            <!--
				<ul class="pagination">
				<li><a class="button white" href="#">previous</a></li>

				<li><a class="button white" href="#">1</a></li>
				<li><a class="button white" href="#">2</a></li>
				<li><a class="button white active" href="#">3</a></li>
				<li><a class="button white" href="#">4</a></li>
				<li><a class="button white" href="#">5</a></li>
				<li><a class="button white" href="#">6</a></li>

				<li><a class="button white" href="#">next</a></li>
				</ul>
              -->  
			</div>
			
	</div>
	
	<!--</div>-->
	
		